import apiUrl from "../base";
import axios from '@/libs/axios';
const measuresLibrary = {
  //风险信息库 ---树
  getQueryRiskTypeTree(prames) {
    return axios.get(`${apiUrl.risk}v1/riskInfoLib/queryRiskTypeTree`,'')
  },
  //添加风险类型
  getAddRiskType(prames) {
    return axios.post(`${apiUrl.risk}v1/riskInfoLib/addRiskType`,prames)
  },
  //编辑
  getUpdateRiskType(prames) {
    return axios.put(`${apiUrl.risk}v1/riskInfoLib/updateRiskType`,prames)
  },
  //列表
  getRiskInfoLibPageList(prames) {
    return axios.post(`${apiUrl.risk}v1/riskInfoLib/pageList`,prames)
  },
  //风险类别
  getRiskCategoryFindAll(prames) {
    return axios.post(`${apiUrl.risk}v1/RiskCategory/findAll`,'')
  },
  //删除作业--单个
  getriskInfoLibDelete(prames) {
    return axios.delete(`${apiUrl.risk}v1/riskInfoLib/delete/${prames}`,'')
  },
  //删除类型
  getriskInfoLibdeleteRiskType(prames) {
    return axios.delete(`${apiUrl.risk}v1/riskInfoLib/deleteRiskType/${prames}`,'')
  },
  //分级方法
  getRiskOperationClassificationMethod(prames) {
    return axios.post(`${apiUrl.risk}v1/RiskOperationClassificationMethod/findAll`,prames)
  },
  //添加风险作业
  getriskInfoLibaddRiskOperation(prames) {
    return axios.post(`${apiUrl.risk}v1/riskInfoLib/addRiskOperation`,prames)
  },
  //修改风险作业
  getriskInfoLibupdateRiskOperation(prames) {
    return axios.put(`${apiUrl.risk}v1/riskInfoLib/updateRiskOperation`,prames)
  },
  //风险详情
  getriskInfoLibdetails(prames) {
    return axios.get(`${apiUrl.risk}v1/riskInfoLib/details/${prames}`,'')
  },
  //风险作业删除
  getriskInfoLibbatchDelete(prames) {
    return axios.post(`${apiUrl.risk}v1/riskInfoLib/batchDelete`,prames);
  },
  //导入
  getriskInfoLibimportExcel(prames) {
    return axios.post(`${apiUrl.risk}v1/riskInfoLib/importExcel`,prames,{timeout: 1000 * 10 * 6});
  },
  //修改导入
  getriskInfoLibupdateImport(prames) {
    return axios.post(`${apiUrl.risk}v1/riskInfoLib/updateImport`,prames,{timeout: 1000 * 10 * 6});
  },


  /*措施方案模块*/
  //树
  getriskInfoLibqueryRiskTree(prames) {
    return axios.get(`${apiUrl.risk}v1/riskInfoLib/queryRiskTree?riskName=${prames}`,'')
  },
  //列表
  getmeasuresLibrarypageList(prames) {
    return axios.post(`${apiUrl.risk}v1/measuresLibrary/pageList`,prames)
  },
  //措施方案汇总
  getmeasuresLibrarylistStatistics(prames) {
    return axios.post(`${apiUrl.risk}v1/measuresLibrary/listStatistics`,prames)
  },
  //频次
  getFrequencyList(prames) {
    return axios.post(`${apiUrl.risk}v1/Frequency/list`,prames)
  },
  //添加
  getmeasuresLibraryAdd(prames) {
    return axios.post(`${apiUrl.risk}v1/measuresLibrary/add`,prames)
  },
  //导入
  getmeasuresLibraryimportExcel(prames) {
    return axios.post(`${apiUrl.risk}v1/measuresLibrary/importExcel`,prames,{timeout: 1000 * 10 * 6});
  },
  //修改导入
  getmeasuresLibraryupdateImport(prames) {
    return axios.post(`${apiUrl.risk}v1/measuresLibrary/updateImport`,prames,{timeout: 1000 * 10 * 6});
  },
  //批量删除
  getmeasuresLibrarybatchDelete(prames) {
    return axios.post(`${apiUrl.risk}v1/measuresLibrary/batchDelete`,prames);
  },
  //单个删除
  getmeasuresLibraryDelete(prames) {
    return axios.delete(`${apiUrl.risk}v1/measuresLibrary/delete/${prames}`,'');
  },
  //详情
  getmeasuresLibrarydetails(prames) {
    return axios.get(`${apiUrl.risk}v1/measuresLibrary/details/${prames}`,'')
  },
  //更新
  getmeasuresLibraryupdate(prames) {
    return axios.put(`${apiUrl.risk}v1/measuresLibrary/update`,prames)
  },

}
export default measuresLibrary
